package vista;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VistaListadoJugadores extends javax.swing.JFrame {
	private JLabel lblTitulo;
	private JPanel panPrincipal;
	private JScrollPane scpListado;
	private JComboBox jCbbxNivelListado;
	private JTable tblJugadores;

	
	public VistaListadoJugadores() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			getContentPane().setBackground(new java.awt.Color(255,255,255));
			setTitle("Jugadores Registrados");
			{
				lblTitulo = new JLabel();
				getContentPane().add(lblTitulo);
				lblTitulo.setText("Listado de Jugadores");
				lblTitulo.setFont(new java.awt.Font("DejaVu Sans",1,16));
				lblTitulo.setBounds(19, 19, 310, 32);
			}
			{
				panPrincipal = new JPanel();
				getContentPane().add(panPrincipal);
				panPrincipal.setBounds(31, 101, 381, 196);
				panPrincipal.setLayout(null);
				{
					scpListado = new JScrollPane();
					panPrincipal.add(scpListado);
					scpListado.setBounds(0, 0, 381, 196);
					{
						tblJugadores = new JTable();
						scpListado.setViewportView(tblJugadores);
					}
				}
			}
			{
				ComboBoxModel jCbbxNivelListadoModel = 
					new DefaultComboBoxModel(
							new String[] { "Basico", "Intermedio","Avanzado" });
				jCbbxNivelListado = new JComboBox();
				getContentPane().add(jCbbxNivelListado);
				jCbbxNivelListado.setModel(jCbbxNivelListadoModel);
				jCbbxNivelListado.setBounds(243, 25, 108, 26);
			}

			pack();
			this.setSize(519, 378);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public void setResultados(AbstractTableModel abstractTableModel) {
		tblJugadores.setModel(abstractTableModel);
	}
	
	public String nivel(){
		return jCbbxNivelListado.getSelectedItem().toString();
	}

	public JComboBox getjCbbxNivelListado() {
		return jCbbxNivelListado;
	}
	
	
  
}